package vcp.server.utility;
/**
 * 
 * @author VCP team
 *  DB query constants class
 */
public class SQLQueries
{
	/**
	 * DB query constants
	 */
	public static final String SELECT = "SELECT ";
	public static final String SELECT_ALL = "SELECT * ";
	public static final String FROM = "FROM ";
	public static final String WHERE = "WHERE ";
	public static final String INSERET_INTO = "INSERT INTO ";
	public static final String DELETE_FROM = "DELETE FROM ";
	public static final String UPDATE = "UPDATE ";
	public static final String MAX__VALUE__AS__VALUE__ = "MAX(%S) AS %s";

	public static final String AND = "AND ";
	public static final String OR = "OR ";
	public static final String DATE = "DATE";
	public static final String GTE = ">=";
	public static final String LTE = "<=";

	public static final String MAX_ID = "maxID ";

	private static final String VALUES = "VALUES(%s)";
	private static final String SET = "SET ";

	/**
	 * DB queries
	 */
	public static final String SELECT_MAX__VALUE__AS__NAME__FROM__TABLE_NAME__ =
			SQLQueries.SELECT
			+ SQLQueries.MAX__VALUE__AS__VALUE__
			+ SQLQueries.FROM
			+ "%s";

	public static final String SELECT_ALL_FROM_SINGLETABLE =
			SQLQueries.SELECT_ALL
			+ SQLQueries.FROM
			+ "%s";

	public static final String SELECT_ALL_FROM__TABLES__ =
			SQLQueries.SELECT_ALL
			+ SQLQueries.FROM
			+ "%s";

	public static final String SELECT_ALL_FROM__SINGLETABLE__WHERE__COMPARE_ =
			SQLQueries.SELECT_ALL
			+ SQLQueries.FROM
			+ "%s "
			+ SQLQueries.WHERE
			+ "%s";

	public static final String SELECT_ALL_FROM__TABLES__WHERE__COMPARE_ =
			SQLQueries.SELECT_ALL
			+ SQLQueries.FROM
			+ "%s "
			+ SQLQueries.WHERE
			+ "%s";

	public static final String INSERT_INTO__TABLENAME__VALUES__ =
			SQLQueries.INSERET_INTO
			+ "%s "
			+ SQLQueries.VALUES;

	public static final String DELETE_FROM__TABLENAME__WHERE__COMPARE_ =
			SQLQueries.DELETE_FROM
			+ "%s "
			+ SQLQueries.WHERE
			+ "%s";

	public static final String UPDATE__TABLENAME__SET__SINGLEVALUE__WHERE__COMPARE_ =
			SQLQueries.UPDATE
			+ "%s "
			+ SQLQueries.SET
			+ "%s "
			+ SQLQueries.WHERE
			+ "%s";

}
